import {request} from '@/utils/request/request';
// 登陆 /login

export type LoginRes = {
  token: string;
};
export function loginPOST(data: any) {
  return request.post<LoginRes>({url: '/login', data});
}

// 注册方法 /register
export const registerPOST = () => {};

// 获取用户详细信息 /getInfo
export const getInfoGET = () => {
  return request.get<any>({url: '/getInfo'});
};

// 退出登陆 /logout
export const logoutPOST = () => {
  return request.post<any>({url: '/logout'});
};

// 获取验证码  /captchaImage
export const getCodeImgGET = () => {
  return request.get<any>({url: '/captchaImage'});
};
